
<template>
  <div class="trackShipment">
    <div style="position: relative; z-index: 2">
      <u-lst-layOut :showNavbar="false" @change="layOutChange" :navbarOption="{ bgColor: 'rgba(255,255,255,1)', title: '查看物流', border: true }" :color="{ statusBarHeightColor: '#fff' }">
        <template v-slot:header>
          <div style="height: 1px;background: #EFEFEF;width:100%"></div>

        </template>
        <template v-slot:main>
          <div class="" style="height: 100%; overflow-y: auto">
            <div class="f bfff mb20 pt30 pl30 pr30 pb30">
              <div style="text-align: center">
                <uv-avatar shape="square" src="" size="80rpx"></uv-avatar>
              </div>
              <div class="pl30">
                <div class="f aic">
                  <div class="" style="color:#9FA0A0;width: 90rpx">订单号</div>
                  <div class="fz30 pr20 pl20 dib">250714-545521671963693</div>
                  <button class="common-button fz26 bfff pl10 pr10 " style="border: 1rpx solid #C9CACA!important;">复制</button>
                </div>
                <div class="fac">
                  <div class="" style="color:#9FA0A0;width: 90rpx">状态</div>
                  <div class=" pr20 pl20">已签收 已发货,待收货</div>
                </div>
              </div>
            </div>
            <div class="bfff mb20 pb30">
              <div style="border-bottom: 1rpx solid #EFEFEF;" class="fz34 pt30 pb30 fw500  pl30 pr30">包裹信息</div>
              <div class="f pt30  pl30 pr30 aic">
                <div class="" style="color:#9FA0A0;width: 120rpx">快递信息</div>
                <div class="fz30 pr20 pl20 di">250714-545521671963693</div>
                <button class="common-button dib ml10 mr0 fz26 bfff  pl10 pr10 " style="border: 1rpx solid #C9CACA!important;">复制</button>
              </div>
              <div class="fac pl30 pr30 pt10">
                <div class="" style="color:#9FA0A0;width: 120rpx">快递电话</div>
                <div class=" pr20 pl20" style="color: #118EEA">95311</div>
              </div>
            </div>

            <div class="bfff  pb30 ">
              <div style="border-bottom: 1rpx solid #EFEFEF;" class="fz34 pl30 pr30 pt30 pb30 fw500">物流轨迹</div>
              <div class="pl40 pt30  pb30 pr30" style="color: #9FA0A0">
                <div class="position-r p1758267564 pb20 pl40" style="box-sizing: border-box;border-left: 4rpx solid #D8D8D8">
                  <div class="box position-a " style="left: -18rpx;">
                    <div class="bfff">
                      <uv-icon color="#53B028" size="32rpx" name="checkmark-circle-fill"></uv-icon>
                    </div>
                  </div>
                  <div class="">
                    <div style="color: #53B028">
                      <div class="dib fw500 fz30">运输中</div>
                      <div class="dib fz24 pl20"> 2025-07-30 16:44:37</div>
                    </div>
                    <div class="pt20 pb30">【镇江市】 快件已到达镇江转运中心，(物流问题无需找商家/平台,请联系专属热线0523-82502340)为您解决</div>
                    <div class="pt40 pb30 fz26" style="color: #53B028"> 2025-07-30 16:44:37</div>
                  </div>
                </div>
                <div class="position-r pb20 p1758267564 pl40" style="border-left: 4rpx solid #D8D8D8">
                  <div class="box position-a " style="left: -18rpx;background: #dff5ce;border-left: 1px solid #C1E5AD;">
                    <div class="p1758001873" style=""></div>
                  </div>
                  <div class="">
                    <div style="color: #53B028">
                      <div class="dib fw500 fz30">运输中</div>
                      <div class="dib fz24 pl20"> 2025-07-30 16:44:37</div>
                    </div>
                    <div class="pt20 pb30">【镇江市】 快件已到达镇江转运中心，(物流问题无需找商家/平台,请联系专属热线0523-82502340)为您解决</div>
                    <div class="pt40 pb30 fz26" style="color: #53B028"> 2025-07-30 16:44:37</div>
                  </div>
                </div>
                <div class="position-r p1758267564  pl40" style="border-left: 4rpx solid #D8D8D8">
                  <div class="p1758005147 position-a" style="left: -12rpx;border-left: 1px solid #C1E5AD;top: 10rpx">
                  </div>
                  <div class="">
                    <div class="pb30">【镇江市】 快件已到达镇江转运中心，(物流问题无需找商家/平台,请联系专属热线0523-82502340)为您解决</div>
                    <div class="pt30 pt20 fz26"> 2025-07-30 16:44:37</div>
                  </div>
                </div>
              </div>

            </div>
          </div>
        </template>
        <template v-slot:footer> </template>
      </u-lst-layOut>
    </div>
  </div>
</template>

<script>
import { storeToRefs } from 'pinia'
import { useUserStore } from '@/store'
import myLayOutVue from "./components/layOut.vue";
import goodVue from "./components/good.vue";
import { butlerList } from "@/api/community.js";
import pageMixin from "./mixin/page.js";
import commonMixin from "./mixin/common.js";
export default {
  components: {
    "u-lst-layOut": myLayOutVue,
    "u-lst-good": goodVue,
  },
  mixins: [commonMixin, pageMixin],
  setup() {
    const user = useUserStore()
    const { userInfo } = storeToRefs(user)
    return {
      userInfo
    }
  },
  data() {
    return {
      form: {
        keywords: "",
        page: 1,
        limit: 10,
        sort: "all",
      },
      current: 0,
      pageForm: {},
      list: [{ name: "待付款", badge: { value: 1, } }, { name: "待发货", badge: { value: 0, } }, { name: "待收货", badge: { value: 0, } }, { name: "待评价", badge: { value: 0, } },],
    };
  },
  onShow() {
  },
  methods: {
    openTap(url) {

    },
    layOutChange(value) {
      this.pageForm = value
    },
    tabTap() {
    },
    initPage(cb = () => { }) {
      this.isOnce = false;
      return
      if (this.form.page == this.current_page) return;
      uni.showLoading({
        title: "加载中",
        mask: true,
      });
      let form = JSON.parse(JSON.stringify(this.form));
      butlerList(form)
        .then((res) => {
          this.isRefreshing = false;
          this.isOnce = true;
          if (res.code === 200) {
            cb();
            uni.hideLoading();
            let data =
              res.result &&
              res.result.data &&
              JSON.parse(JSON.stringify(res.result.data));
            this.total = res.result.total;
            this.current_page = res.result.current_page;
            this.tableData = this.tableData.concat(data);
            if (this.total <= this.tableData.length) this.status = "nomore";
          }
        })
        .catch(() => {
          uni.hideLoading();
          this.isRefreshing = false;
          this.isOnce = true;
        });
    },
  },
};
</script>
<style>
page {
  background-color: #f7f8f8;
  color: #333333;
  font-size: 28rpx;
}
</style><style lang="scss" scoped>
@import "./common.scss";

.trackShipment {
  .box {
    width: 32rpx;
    height: 32rpx;
    min-height: 32rpx;
    max-height: 32rpx;
    min-width: 32rpx;
    max-width: 32rpx;
    overflow: hidden;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    top: 0;
    z-index: 1;
  }
  .p1758001873 {
    border-radius: 50%;
    background: #53b028;
    width: 20rpx;
    height: 20rpx;
    min-height: 20rpx;
    max-height: 20rpx;
    min-width: 20rpx;
    max-width: 20rpx;
    overflow: hidden;
    box-sizing: border-box;
  }
  .p1758005147 {
    border-radius: 50%;
    background: #d8d8d8;
    width: 20rpx;
    height: 20rpx;
    min-height: 20rpx;
    max-height: 20rpx;
    min-width: 20rpx;
    max-width: 20rpx;
    overflow: hidden;
    box-sizing: border-box;
  }
}
</style>
